""" System imports """
import os, sys
import logging

""" Other modules """
import pygame

""" Game """
#import resourcemanager
from constants import *
from label import Label
import font

""" Constants """

""" Set up logging """
button_logger = logging.getLogger("epicquest.button")
button_logger .debug("Initializing Button")

""" A button. You can push it!
"""
class Button(Label):
        
    """
    All params are keyword args. If you don't set one, it will choose a default.
    @see: widget.Widget for base class params
    @param handler: Handler to call when pressed 
    """
    def __init__(self, *args, **kwargs):
        Label.__init__(self, *args, **kwargs)
        self.handler = kwargs.get("handler", None)

    def update(self):
        if self.dirty == 0:
            return
        Label.update(self)
        self.dirty = 0
    
    def setText(self, text):
        self.text = text
        self.dirty = 1
    
    
    
        
    
    
